package com.yangchao.webflux;

import java.util.Arrays;
import java.util.List;

public class chat05takeWhile {
    public static void main(String[] args) throws InterruptedException {
        List<Integer> numberList = Arrays.asList(1, 3, 5, 8, 10, 20, 35, 2, 5, 7);
        numberList.stream().takeWhile(num -> num <= 20).forEach(System.out::println);
    }
}
